<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>后台管理 - 易买网</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<script type="text/javascript" src="scripts/function-manage-modify.js"></script>
</head>
<body>
<div id="header" class="wrap">
	<div id="logo"><img src="../images/logo.gif" /></div>
	<div class="help"><a href="../index.jsp">返回前台页面</a></div>
	<div class="navbar">
		<ul class="clearfix">
			<li><a href="index.jsp">首页</a></li>
			<li><a href="user.jsp">用户</a></li>
			<li class="current"><a href="productList">商品</a></li>
			<li><a href="order.jsp">订单</a></li>
			<li><a href="selectMessage">留言</a></li>
			<li><a href="selectNews">新闻</a></li>
		</ul>
	</div>
</div>
<div id="childNav">
	<div class="welcome wrap">
		管理员pillys您好，今天是2012-12-21，欢迎回到管理后台。
	</div>
</div>
<div id="position" class="wrap">
	您现在的位置：<a href="index.jsp">易买网</a> &gt; 管理后台
</div>
<div id="main" class="wrap">
	<div id="menu-mng" class="lefter">
		<div class="box">
			<dl>
				<dt>用户管理</dt>
				<dd><em><a href="user-add.jsp">新增</a></em><a href="user.jsp">用户管理</a></dd>
				<dt>商品信息</dt>
				<dd><em><a href="addProduct">新增</a></em><a href="list">分类管理</a></dd>
				<dd><em><a href="add">新增</a></em><a href="productList">商品管理</a></dd>
				<dt>订单管理</dt>
				<dd><a href="order.jsp">订单管理</a></dd>
				<dt>留言管理</dt>
				<dd><a href="selectMessage">留言管理</a></dd>
				<dt>新闻管理</dt>
				<dd><em><a href="addNews">新增</a></em><a href="selectNews">新闻管理</a></dd>
			</dl>
		</div>
	</div>
	<div class="main">
		<h2>修改商品</h2>
		<div class="manage">
			<form action="update.do?productId=${product.productId }" method="post" enctype="multipart/form-data">
				<table class="form">
					<tr>
						<td class="field">商品名称：</td>
						<td><input type="text" class="text" name="productName" value="${product.productName }"/><span id="name" style='color:red'></span></td>
					</tr>
					<tr>
						<td class="field">所属分类：</td>
						<td>
							<select name="classId">
								<option value="0">所属分类</option>
								<c:forEach var="productClass" items="${productClasses }">
									<option value="${productClass.classId }">${productClass.className }</option>
								</c:forEach>
							</select>
							<span id="classId" style='color:red'></span>
						</td>
					</tr>
					<tr>
						<td class="field">商品原图片：</td>
						<td><img src="images/product/${product.productImg }" /></td>
					</tr>
					<tr>
						<td class="field">商品图片：</td>
						<td><input type="file" name="photo"/><span id="photo" style='color:red' class="required"></span></td>
					</tr>
					<tr>
						<td class="field">商品价格：</td>
						<td><input type="text" class="text tiny" name="productPrice" value="${product.productPrice }"/> 元<span id="price" style='color:red'></span></td>
					</tr>
					<tr>
						<td class="field">品牌：</td>
						<td><input type="text" class="text" name="productBrand" value="${product.productBrand }"/><span id="brand" style='color:red'></span></td>
					</tr>
					<tr>
						<td class="field">库存：</td>
						<td><input type="text" class="text tiny" name="productNum" value="${product.productNum }" /><span id="num" style='color:red'></span></td>
					</tr>
					<tr>
						<td class="field">条码号：</td>
						<td><input type="text" class="text" name="productBarcode" value="${product.productBarcode }"/><span id="barcode" style='color:red'></span></td>
					</tr>
					<tr>
						<td class="field">是否热销：</td>
						<td>
							<c:if test="${product.ishost == '是' }">
								<input type="radio"  name="ishost" value="是" checked="checked"/>是
								<input type="radio"  name="ishost" value="否"/>否<span id="ishost" style='color:red'></span>
							</c:if>
							<c:if test="${product.ishost == '否' }">
								<input type="radio"  name="ishost" value="是"/>是
								<input type="radio"  name="ishost" value="否" checked="checked"/>否<span id="ishost" style='color:red'></span>
							</c:if>
						</td>
					</tr>
				    <tr>
						<td class="field">是否特价：</td>
						<td>
							<c:if test="${product.isdiscount == '是' }">
								<input type="radio"  name="isdiscount" value="是" checked="checked"/>是
								<input type="radio"  name="isdiscount" value="否"/>否<span id="isdiscount" style='color:red'></span>
							</c:if>
							<c:if test="${product.isdiscount == '否' }">
								<input type="radio"  name="isdiscount" value="是"/>是
								<input type="radio"  name="isdiscount" value="否" checked="checked"/>否<span id="isdiscount" style='color:red'></span>
							</c:if>
						</td>
					</tr>
					<tr>
						<td></td>
						<td><label class="ui-blue"><input type="submit" name="submit" value="修改" /></label></td>
					</tr>
				</table>
			</form>
		</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">
	Copyright &copy; 2017 爱苗科技 All Rights Reserved. 皖ICP证000001号
</div>
</body>
</html>